/* 全局样式 */
:root {
    --primary-color: #4169E1;
    --secondary-color: #67E0E3;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --border-radius: 20px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
}

.nav-brand {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-item.active,
.nav-item:hover {
    background: var(--primary-color);
    color: white;
}

/* 导航栏登录注册按钮 */
.nav-auth {
    display: flex;
    gap: 10px;
}

.auth-btn {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.auth-btn.login {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.auth-btn.login:hover {
    background: rgba(65, 105, 225, 0.1);
}

.auth-btn.register {
    background: var(--primary-color);
    border: none;
    color: white;
}

.auth-btn.register:hover {
    background: #3451b2;
}

/* 主要内容区域 */
main {
    margin-top: 60px;
    padding: 20px;
    min-height: calc(100vh - 120px);
}

.section {
    display: none;
    padding: 20px;
}

.section.active {
    display: block;
}

/* 首页样式 */
.hero {
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    color: var(--text-color);
    margin-bottom: 30px;
}

.cta-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: var(--border-radius);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(65, 105, 225, 0.3);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 20px;
}

.feature-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* 数字生命聊天界面 */
.chat-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 30px;
    overflow: hidden;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.message p {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    margin: 0;
    line-height: 1.4;
}

.message.user {
    align-items: flex-end;
}

.message.user p {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 5px;
}

.message.ai {
    align-items: flex-start;
}

.message.ai p {
    background: #f0f2f5;
    color: #333;
    border-bottom-left-radius: 5px;
}

.message.system {
    align-items: center;
}

.message.system p {
    background: #fff3cd;
    color: #856404;
    font-size: 0.9em;
    border-radius: 20px;
}

.chat-input {
    display: flex;
    align-items: center;
    padding: 15px;
    border-top: 1px solid #eee;
    background: #fff;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
    font-size: 1em;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chat-input button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-input button:hover {
    background: #3451b2;
    transform: scale(1.1);
}

/* 云脑图谱 */
.brain-container {
    max-width: 1200px;
    margin: 0 auto;
}

.brain-header {
    text-align: center;
    margin-bottom: 30px;
}

.brain-chart {
    height: 500px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.brain-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #666;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

/* 个人中心 */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    padding: 30px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 30px;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h2 {
    margin-bottom: 10px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    transition: var(--transition);
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-top: 10px;
}

/* 底部导航栏（移动端） */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--card-bg);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* 个人中心统计样式 */
.statistics-container {
    margin-top: 30px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.stat-label {
    display: block;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.activity-list {
    margin-top: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item i {
    width: 30px;
    height: 30px;
    background: #f0f2f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: var(--primary-color);
}

.activity-content {
    flex: 1;
}

.activity-text {
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: #999;
}

/* 云脑文件上传样式 */
.brain-actions {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.upload-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.upload-btn:hover {
    background: #3451b2;
    transform: translateY(-2px);
}

.upload-btn i {
    font-size: 16px;
}

.upload-status {
    flex: 1;
    max-width: 300px;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.progress-inner {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

/* 生命广场样式 */
.square-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.square-header {
    text-align: center;
    margin-bottom: 40px;
}

.square-header h2 {
    font-size: 2em;
    color: #333;
    margin-bottom: 10px;
}

.square-header p {
    color: #666;
    font-size: 1.1em;
}

.life-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.life-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.life-card:hover {
    transform: translateY(-5px);
}

.life-card .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.life-card .name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.life-card .description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

.life-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.life-card .tag {
    background: rgba(65,105,225,0.1);
    color: #4169E1;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9em;
}

.life-card .price {
    color: #f85f5f;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
}

.life-card .buy-btn {
    width: 100%;
    background: #4169E1;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.life-card .buy-btn:hover {
    background: #3258d3;
}

.loading-more {
    text-align: center;
    padding: 20px;
}

.spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4169E1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 个人中心菜单样式 */
.profile-menu {
    background: #fff;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.3s ease;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: #f8f9fa;
}

.menu-item i {
    margin-right: 15px;
    color: #4169E1;
}

.menu-item span {
    flex: 1;
    color: #333;
}

.menu-item .fa-chevron-right {
    color: #999;
}

/* 数字生命页面样式 */
.digital-life {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.life-header {
    text-align: center;
    margin-bottom: 40px;
}

.life-header h2 {
    font-size: 2em;
    color: #333;
    margin-bottom: 10px;
}

.life-header p {
    color: #666;
    font-size: 1.1em;
}

.upload-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.upload-section {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.upload-section h3 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-section h3 i {
    color: var(--primary-color);
}

.upload-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upload-content textarea {
    min-height: 150px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
}

.voice-recorder {
    display: flex;
    align-items: center;
    gap: 15px;
}

.record-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.record-btn:hover {
    transform: scale(1.1);
}

.record-btn.recording {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.record-status {
    color: #666;
}

.voice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.voice-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    gap: 10px;
}

.image-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.image-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.upload-progress-container {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.progress-header {
    margin-bottom: 15px;
}

.progress-header h3 {
    color: #333;
    margin-bottom: 5px;
}

.progress-status {
    color: #666;
    font-size: 0.9em;
}

.progress-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.progress-inner {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

/* 意识体生成按钮样式 */
.generate-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.generate-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.generate-btn:hover {
    background: #3451b2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 81, 178, 0.3);
}

.generate-btn i {
    font-size: 1.2em;
}

.generate-tip {
    margin-top: 15px;
    color: #666;
    font-size: 0.9em;
} 